<template>
	<view class="onebox" @click="toActivityDetail(item)">
		<image :src="item.images[0]" mode="aspectFill" class="picture"></image>
		<view class="title">
			{{item.title}}
		</view>
		<view class="bottom">
			<image :src="item.avater" mode="" class="head"></image>
			<view class="name">
				<view class="sname">{{item.nickName}}</view>
				<view class="ulocation">{{item.address}}</view>
			</view>
			<view class="claps">
				<image :src="'../../static/activityClap.png'" mode="" class="clap" @click.stop="activeClap(item)"></image>
				<view class="number">
					{{item.attendNum}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>

	export default {
		name:"tribeActivity",
		props:{
			item:{
				type:Object,
				default(){
					return {
						title:'还未安排活动呢',
						nickName:'',
						address:'',
						avater:'',
						images:[],
						attendNumber:0,
					}
				}
			}
		},
		data() {
			return {
				flag:true,
			};
		},
		methods:{
			activeClap(item){
				// this.item.signUpNumber=this.flag?this.item.signUpNumber+1:this.item.signUpNumber-1
				// this.clapImageNumber=this.flag?this.clapImageNumber+1:this.clapImageNumber-1
				// this.flag=!this.flag
				uni.navigateTo({
					url:`/pages/tribe/details/signUp?details=`+JSON.stringify(item)
				})
			},
			toActivityDetail(item){
				uni.navigateTo({
					url:`/pages/tribe/details/activityDetails?details=`+JSON.stringify(item)
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
.onebox {
		height: 450rpx;
		width: 290rpx;
		background-color: #fff;
		display: inline-block;
		margin-left: 25rpx;
		margin-right: 10rpx;
		margin-top: 20rpx;
		border-radius: 40rpx;
		box-shadow: 15rpx 10rpx 12rpx 5rpx rgba(0, 0, 0, 0.1);
		
		.picture {
			background-color: pink;
			height: 310rpx;
			width: 240rpx;
			border-radius: 30rpx;
			margin-top: 20rpx;
			margin-left: 17rpx;
		}
		.title {
			font-size: 28rpx;
			font-weight: bold;
			width: 250rpx;
			margin-left: 17rpx;
			
			
		}
		.bottom {
			height: 50rpx;
			width: 290rpx;
			
			
			.head {
				display: inline-block;
				height: 46rpx;
				width: 46rpx;
				border-radius: 23rpx;
				margin-left: 20rpx;
				background-color: pink;
				position: relative;
				top: -30rpx;
			}
			.name {
				position: relative;
				top: -30rpx;
				display: inline-block;
				margin-left: 8rpx;
				// font-size: 25rpx;
				// font-weight: bold;
				height: 50rpx;
				width: 160rpx;	
				
				.sname {
					font-size: 25rpx;
					font-weight: 600;
					height: 30rpx;
				}
				.ulocation {
					font-size: 20rpx;
				}
			}
			.claps {
				display: inline-block;
				width: 30rpx;
				height: 45rpx;
				position: relative;
				top: -10rpx;
				right: 10rpx;
				z-index: 1;
				.clap {
					width: 42rpx;
					height: 45rpx;
				}
				.number {
					text-align: center;
					color: dimgrey;
					font-size: 23rpx;
					position: relative;
					top: -10rpx;
					right: -8rpx;
				}
			}
		}
	}
</style>